package com.winchain.chainbill.asset.biz.credit.controller;

import com.shell.bee.base.annotation.Logging;
import com.shell.bee.entity.mvc.RetMsg;
import com.shell.bee.mvc.controller.BaseController;
import com.winchain.chainbill.asset.biz.credit.service.AssetsMgtService;
import java.math.BigDecimal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class AssetMgtController extends BaseController {
	@Autowired
	private AssetsMgtService assetsMgtService;

	@RequestMapping
	@ResponseBody
	@Logging(module = "��������", methods = "��������")
	public RetMsg issue(BigDecimal crAssert, BigDecimal rvAssert) throws Exception {
		String txSnHost = this.assetsMgtService.issue(crAssert, rvAssert);

		return new RetMsg("success", true, "����������", txSnHost);
	}

	@RequestMapping
	@ResponseBody
	@Logging(module = "��������", methods = "��������")
	public RetMsg adjust(BigDecimal crAssert, BigDecimal rvAssert) throws Exception {
		String txSnHost = this.assetsMgtService.adjust(crAssert, rvAssert);

		return new RetMsg("success", true, "����������", txSnHost);
	}
}
